Skip to content

deps: move js-yaml 4 to 5, with a parse test on the real data#1000

Merged
krassowski merged 1 commit into
masterfrom
phase4/js-yaml-5
Jul 1, 2026
Merged

deps: move js-yaml 4 to 5, with a parse test on the real data#1000
krassowski merged 1 commit into
masterfrom
phase4/js-yaml-5

Conversation

@notluquis

Copy link
Copy Markdown
Collaborator

js-yaml 5 drops the safe* helpers (we never used them) and parses numbers per YAML 1.2 instead of 1.1. The only two uses here are yaml.load() on the bundled-env spec (buildutil.js) and on the updater's latest.yml (app.ts), both reading version strings, so neither depends on the old number behavior. v5 still ships a CommonJS build, so the main process keeps requiring it.

I added test/unit/js-yaml-parse.test.ts that loads the real env_installer/jlab_server.yaml and a latest.yml-shaped manifest and pins what those two call sites actually read (the jupyterlab pin, the version string).

Easy to verify on your side: yarn test runs the new parse test, and a yarn build still resolves the bundled jupyterlab version. The YAML 1.2 number-parsing change is the thing I checked against our data before bumping.

js-yaml 5 drops the safe* helpers (we never used them) and parses numbers
per YAML 1.2. We only call yaml.load() in two spots, the bundled-env spec
in buildutil.js and the auto-updater's latest.yml in app.ts, both reading
strings, so neither leans on the 1.1 number quirks. v5 is still dual
CJS/ESM, so the CommonJS main keeps loading it.

Added a test that loads the actual env_installer/jlab_server.yaml and a
latest.yml-shaped manifest and asserts what those two call sites read.

You can sanity-check it yourself: yarn test runs the new parse test green
and a yarn build still finds the bundled jupyterlab pin. The 1.2 vs 1.1
number-parsing question is the part I dug into before bumping.
@krassowski krassowski merged commit 84066d4 into master Jul 1, 2026
12 checks passed
@notluquis notluquis deleted the phase4/js-yaml-5 branch July 2, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants